home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_block_ledgecontrol.cog < prev    next >
Text File  |  1999-11-15  |  4KB  |  202 lines

  1. # Jones 3D Cog Script
  2. #
  3. # VOL_BlockLedgeControl.cog
  4. #
  5. # toggles hang ledge tag on faces in the block puzzle ledge in hidden cave 2    
  6. #
  7. # [CMG]
  8. #
  9. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13. #...................MESSAGES............................    
  14.     message        startup
  15.     message        entered
  16.     message        exited
  17.  
  18. #...................PROPS............................    
  19.     thing        block0                            linkID=2        
  20.     thing        block1                            linkID=2
  21.     thing        block2                            linkID=2
  22.  
  23.  
  24. #...................BLOCK SURFACES............................
  25.     surface        surf0                            mask=0x80    
  26.     surface        surf1                            mask=0x80    
  27.     surface        surf2                            mask=0x80    
  28.     surface        surf3                            mask=0x80    
  29.     surface        surf4                            mask=0x80    
  30.     surface        surf5                            mask=0x80    
  31.     surface        surf6                            mask=0x80    
  32.     surface        surf7                            mask=0x80    
  33.     surface        surf8                            mask=0x80    
  34.     surface        surf9                            mask=0x80    
  35.     surface        surf10                            mask=0x80    
  36.  
  37. #...................LEDGE SURFACES............................
  38.     surface        ledge0                                
  39.     surface        ledge1                                
  40.     surface        ledge2                                
  41.     surface        ledge3                                
  42.     surface        ledge4                                
  43.     surface        ledge5                                
  44.     surface        ledge6                                
  45.     surface        ledge7                                
  46.     surface        ledge8                                
  47.     surface        ledge9                                
  48.     surface        ledge10                            
  49.     surface        ledge11                            
  50.  
  51.  
  52. end
  53. # ========================================================================================
  54. code
  55.  
  56. startup:
  57.     
  58.     # clear hang flag from appropriate ledges
  59.     ClearSurfaceFlags(ledge2, 0x1000000);
  60.     ClearSurfaceFlags(ledge5, 0x1000000);
  61.     ClearSurfaceFlags(ledge9, 0x1000000);
  62.  
  63. return;
  64.  
  65. # ========================================================================================
  66. entered:    # if a block enters a surface above a hangledge, the hang surf bit is cleared
  67.  
  68.  
  69. If ((GetSourceRef() == block0) || (GetSourceRef() == block1) || (GetSourceRef() == block2))
  70. {
  71.  
  72. If (GetSenderRef() == surf0) 
  73.     {
  74.     ClearSurfaceFlags(ledge0, 0x1000000);
  75.     }
  76.  
  77. If (GetSenderRef() == surf1)
  78.     {
  79.     ClearSurfaceFlags(ledge1, 0x1000000);
  80.     }
  81.  
  82. If (GetSenderRef() == surf2)
  83.     {
  84.     ClearSurfaceFlags(ledge2, 0x1000000);
  85.     }
  86.  
  87. If (GetSenderRef() == surf3)
  88.     {
  89.     ClearSurfaceFlags(ledge3, 0x1000000);
  90.     }
  91.  
  92. If (GetSenderRef() == surf4)
  93.     {
  94.     ClearSurfaceFlags(ledge4, 0x1000000);
  95.     }
  96.  
  97. If (GetSenderRef() == surf5)
  98.     {
  99.     ClearSurfaceFlags(ledge5, 0x1000000);
  100.     }
  101.  
  102. If (GetSenderRef() == surf6)
  103.     {
  104.     ClearSurfaceFlags(ledge6, 0x1000000);
  105.     }
  106.  
  107. If (GetSenderRef() == surf7)
  108.     {
  109.     ClearSurfaceFlags(ledge7, 0x1000000);
  110.     }
  111.  
  112. If (GetSenderRef() == surf8)
  113.     {
  114.     ClearSurfaceFlags(ledge8, 0x1000000);
  115.     ClearSurfaceFlags(ledge11, 0x1000000);
  116.     }
  117.  
  118. If (GetSenderRef() == surf9)
  119.     {
  120.     ClearSurfaceFlags(ledge9, 0x1000000);
  121.     }
  122.  
  123. If (GetSenderRef() == surf10)
  124.     {
  125.     ClearSurfaceFlags(ledge10, 0x1000000);
  126.     }
  127.  
  128. }
  129. return;
  130.     
  131.  
  132.  
  133. # ========================================================================================
  134. exited:        # if a block exits a surface above a hangledge, the hang surf bit is set
  135.  
  136. If ((GetSourceRef() == block0) || (GetSourceRef() == block1) || (GetSourceRef() == block2))
  137. {
  138.  
  139. If (GetSenderRef() == surf0)
  140.     {
  141.     SetSurfaceFlags(ledge0, 0x1000000);
  142.     }
  143.  
  144. If (GetSenderRef() == surf1)
  145.     {
  146.     SetSurfaceFlags(ledge1, 0x1000000);
  147.     }
  148.  
  149. If (GetSenderRef() == surf2)
  150.     {
  151.     SetSurfaceFlags(ledge2, 0x1000000);
  152.     }
  153.  
  154. If (GetSenderRef() == surf3)
  155.     {
  156.     SetSurfaceFlags(ledge3, 0x1000000);
  157.     }
  158.  
  159. If (GetSenderRef() == surf4)
  160.     {
  161.     SetSurfaceFlags(ledge4, 0x1000000);
  162.     }
  163.  
  164. If (GetSenderRef() == surf5)
  165.     {
  166.     SetSurfaceFlags(ledge5, 0x1000000);
  167.     }
  168.  
  169. If (GetSenderRef() == surf6)
  170.     {
  171.     SetSurfaceFlags(ledge6, 0x1000000);
  172.     }
  173.  
  174. If (GetSenderRef() == surf7)
  175.     {
  176.     SetSurfaceFlags(ledge7, 0x1000000);
  177.     }
  178.  
  179. If (GetSenderRef() == surf8)
  180.     {
  181.     SetSurfaceFlags(ledge8, 0x1000000);
  182.     SetSurfaceFlags(ledge11, 0x1000000);
  183.     }
  184.  
  185. If (GetSenderRef() == surf9)
  186.     {
  187.     SetSurfaceFlags(ledge9, 0x1000000);
  188.     }
  189.  
  190. If (GetSenderRef() == surf10)
  191.     {
  192.     SetSurfaceFlags(ledge10, 0x1000000);
  193.     }
  194. }
  195.  
  196. return;
  197.     
  198. # ========================================================================================
  199.  
  200. end
  201.  
  202.